package com.study.controller;

import com.study.service.StudentService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Created by think on 2016/4/23.
 */
@Controller
@RequestMapping("/student")
public class StudentController {
    Logger logger = LoggerFactory.getLogger(StudentController.class);
    @Resource
    private StudentService studentService;

    @RequestMapping("/add")
    @ResponseBody
    public String addStudent() {
        studentService.addStudent();
        logger.info("student添加成功");
        return "student添加成功";
    }
}
